package com.lagou.assignment.dao;

import com.lagou.assignment.model.Student;

import java.sql.SQLException;
import java.util.List;

public interface StudentDao{

    //自定义方法描述添加学生功能的实现
    public abstract int insert(Student student) throws SQLException;

    //自定义方法描述删除学生功能的实现
    public abstract int delete(int sid) throws SQLException;

    //自定义方法描述编辑学生功能的实现
    public abstract int update(Student student) throws SQLException;

    //自定义方法描述获取学生数量的实现
    public abstract int count() throws SQLException;

    //自定义方法描述根据学生姓名获取学生信息的实现
    public abstract List<Student> select(String sname) throws SQLException;

    //自定义方法描述根据学号或者主键获取学生信息的实现
    public abstract Student select(String type, int id) throws SQLException;

    //自定义方法描述根据学号或者主键获取学生信息的实现
    public abstract Student select(int sid, String sname) throws SQLException;

    //自定义方法描述分页获取学生信息列表的实现
    public abstract List<Student> select(int page, int limit) throws SQLException;

}
